package com.util;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.pojo.Comment;
import java.util.List;

/**
 * @author 李浩然
 * @version 1.0
 * @description: TODO
 * @date 2022/11/12 11:34
 */
public class CommentPageUtil<U> {
//    public PageInfo getPage(Integer currentPage, Integer pageSize, List<Comment> resultList) {
//        Page page = new Page(currentPage, pageSize);
//        page.setTotal(resultList.size());
//        int startIndex = (currentPage - 1) * pageSize;
//        int endIndex = Math.min(resultList.size(), startIndex + pageSize);
//        page.addAll(resultList.subList(startIndex, endIndex));
//        return new PageInfo(page);
//    }
}
